<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>

  <body>
    <div id="app" style="width:800px;height:600px;"></div>
    <script src="../../../../node_modules/echarts/dist/echarts.js"></script>
    <!-- <script src="../../../../node_modules/echarts/theme/macarons.js"></script> -->
    <script>
      // 3.基于准备好的dom，初始化echarts实例
      var myChart = echarts.init(document.getElementById("app"));

      // 4.指定图表的配置项和数据
      // var option = {
      //   // 图标的标题
      //     title: {
      //         text: 'ECharts 入门示例'
      //     },
      //     // 控制数据显示
      //     tooltip: {},
      //     // 控制内容显示开关
      //     legend: {
      //         data:['销量','库存']
      //     },
      //     // x轴配置
      //     xAxis: {
      //         data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
      //     },
      //     // y轴配置
      //     yAxis: {},
      //     //
      //     series: [{
      //         name: '销量',
      //         type: 'bar',
      //         data: [5, 20, 36, 10, 10, 20]
      //     },
      //     {
      //         name: '库存',
      //         type: 'bar',
      //         data: [15, 30, 136, 106, 5, 1]
      //     }]
      // };

      var option = {
        title: {
          text: "基础雷达图"
        },
        legend: {
          data: ["预算分配（Allocated Budget）", "实际开销（Actual Spending）"]
        },
        radar: {
          // shape: 'circle',
          indicator: [
            { name: "销售（Sales）", max: 6500 },
            { name: "管理（Administration）", max: 16000 },
            { name: "信息技术（Information Technology）", max: 30000 },
            { name: "客服（Customer Support）", max: 38000 },
            { name: "研发（Development）", max: 52000 },
            { name: "市场（Marketing）", max: 25000 }
          ]
        },
        series: [
          {
            name: "预算 vs 开销（Budget vs spending）",
            type: "radar",
            data: [
              {
                value: [4200, 3000, 20000, 35000, 50000, 18000],
                name: "预算分配（Allocated Budget）"
              },
              {
                value: [5000, 14000, 28000, 26000, 42000, 21000],
                name: "实际开销（Actual Spending）"
              }
            ]
          }
        ]
      };
      // 5.使用刚指定的配置项和数据显示图表。
      myChart.setOption(option);
    </script>
  </body>
</html>
